package ksj.common;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import bean.Owner;
import bean.OwnerPK;


public interface DBRepository extends CrudRepository<Owner, OwnerPK> {
	@Query(value = "select distinct owner_id, ownername from #{#entityName} ")
    List<Integer> getDistinctHubs();
	
	
	
//	@Query(value = "select distinct siloId from #{#entityName} b where hubId=?1 ")
//    List<String> getDistinctSilos(String hubId);
	
//	List<Owner> findBySiloIdAndHubId(String siloId,String hubId);
}
